package com.bianguo.android.functiondemo.retrofit;

public class ApiException extends Exception {

    private int code;
    private String message;

    public ApiException(Throwable throwable) {
        super(throwable);
    }

    public ApiException(Throwable throwable, @CodeException.CodeEp int code) {
        super(throwable);
        setCode(code);
    }

    public ApiException(Throwable throwable, @CodeException.CodeEp int code, String message) {
        super(throwable);
        setCode(code);
        setMessage(message);
    }

    @CodeException.CodeEp
    public int getCode() {
        return code;
    }

    public void setCode(@CodeException.CodeEp int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
